package com.sxjh.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("it_unlock_log")
@ApiModel(value = "unlock对象", description = "开锁日志 ")
public class Unlock {

    @ApiModelProperty(value = "唯一ID")
    @TableId(value = "id", type = IdType.AUTO)
    @ExcelProperty("编号")
    private Integer id;

    @ApiModelProperty(value = "人员姓名")
    @TableField("name")
    @ExcelProperty("开锁人名")
    private String name;

    @ApiModelProperty(value = "产生地点")
    @TableField("addr")
    @ExcelProperty("开锁地点")
    private String addr;

    @ApiModelProperty(value = "产生时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("created_at")
    @ExcelProperty("开锁时间")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "报警类型:55时为拆机报警,58为错按报警,32为胁迫报警,34为反潜报警")
    @ExcelProperty("报警类型")
    private String type;

    @ApiModelProperty(value = "报警类型:55时为拆机报警,58为错按报警,32为胁迫报警,34为反潜报警")
    @TableField("type_name")
    @ExcelProperty("报警类型名称")
    private String typeName;

    @ApiModelProperty(value = "是否已读:1,已读;2未读")
    @TableField(value = "readed")
    private Integer readed;

    @ApiModelProperty(value = "是否推送, 1：是, 2：否")
    @TableField(value = "is_push")
    private Integer isPush;
}
